package com.hncboy.chatgpt.front.service;


import com.fasterxml.jackson.core.JsonProcessingException;

public interface KeyService {

    String generateKey(int amount, String alipayAuthCode) throws AlipayPaymentException;

    Integer getUsageCount(String key) throws InvalidKeyException, JsonProcessingException;

    String getKey(String ip, int i) throws JsonProcessingException;

    public class AlipayPaymentException extends Exception {
        private static final long serialVersionUID = 1L;
    }

    public class InvalidKeyException extends Exception {
        private static final long serialVersionUID = 1L;

        public InvalidKeyException(String s) {
        }
    }

}
